-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add a ipfs repo ls-roots command #2447
Conversation
…e locally Currently use the recursive pin to find the top hash, so it doesn't list everything. License: MIT Signed-off-by: Michael Muré <batolettre@gmail.com>
License: MIT Signed-off-by: Michael Muré <batolettre@gmail.com>
License: MIT Signed-off-by: Michael Muré <batolettre@gmail.com>
License: MIT Signed-off-by: Michael Muré <batolettre@gmail.com>
Tagline: "Display the top nodes stored locally", | ||
ShortDescription: ` | ||
'ipfs repo ls-roots' will display the top-level files or directory | ||
that are stored locally as well a some of their properties. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as well as some
License: MIT Signed-off-by: Michael Muré <batolettre@gmail.com>
|
||
unixFSNode, err := unixfs.FromBytes(node.Data) | ||
if err != nil { | ||
// ignore nodes that are not unixFs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead of ignoring them, maybe we could just put their type as 'Unknown' or something?
Has been marked 'waiting on author' for about a year. Closing for now. Please do feel free to reopen this as necessary. Closing old PRs just helps us more easily see what needs immediate attention |
This PR follow #1736 that can't be reopened.
Here is how it looks like now:
A couple of notes:
Blockstore.AllKeysChan()
is not deterministic, the order of the result is not deterministic either. Is this a problem ?I also got hit by #1554. Some keys are not retrieved by
Blockstore.AllKeysChan()
so it break the root finding algorithm and some extra objects are displayed.